Object-oriented parallel parsing for context-free grammars
نویسندگان
چکیده
This paper describes a new parallel parsing scheme for context-free grammars and our experience of implementing this scheme, and it also reports the result of our simulation for running the parsing program on a massive parallel processor. In our basic parsing scheme, a set of context freegrammar :,:ules is represented by a network of processorlike computing agents each having its local memory. Each computing agent in the network corresponds to an occurfence of a non-terminal or terminal symbol appearing in the grammar rules. Computing agents in the network work concurrently and communicate with one another by passing messages which are partial parse trees. This scheme is shown to he fast (0(n ,h) time for the first complete parse tree, where n is the length of an input sentence and h is the height of the parse tree) and useful in various modes of parsing such as on-line parsing, overlap parsing, on-line unparsing, pipe-lining to semantics processing, etc. Performance evaluation for implementing this scheme on a massive parallel machine is conducted by distributed event simulation using the Time Warp mechanism /Jeffersong5/. Our parsing scheme is implemented in a programming language called ABCL/1 which is designed for objectoriented concurrent programming and used for various concurrent programming/Yonezawa86/ . The program is currently runing on standard single-cpu nlachines such as SUN3s and Symbolics Lisp machines (by simulated parallelism). In our experiment and simulation, a set of about 250 context-free grammar rules specifying a subset of English is represented by the corresponding network of objects (i.e., computing agents) and about 1100 concurrently executable objects are involved. 1 I n t r o d u c t i o n This paper prcsents a new approach to parsing for context-free grammars, which is Conceptually very simple. The significance of our approach is supported by recent trends in computer-related fields. In computational linguistics, much attention has been drawn to parsing of context-free grammars owing to the progress of contextfree based grammatical frameworks for natural languages such as LFG /Kaplan82/ , GPSG /Gazdar85/ . Furthermore, many practical natural language interface systems are based on context-free (phrase structure) grammars. In computer architecture and programming, exploitation of parallelism has be actively pursued; innovative computer architectures utilizing a large number of processors /Gott l ieb83/ /Sei tz85/ have been developed and accordingly new methodologies for concurrent l)rogramming /AghaS6/ /Gelern te rS6/ /Yonezawa87/ha . re been actively studied. In our basic parsing scheme, a given set of contextfree grammar rules is viewed as a network of terminal and non-terminal symbols, and a corresponding network of processor-like computing agents with internal memory (or simple processors) is constructed. The node set of the network has a direct one-to-one correspondence to the set of occurrences of symbols appearing in the grammar rules and the link topology of the network is directly derived from the structure of the set of grammar rules. Our parsing scheme produces all the possible parse trees for a given input string without duplication. Since the notion of objects in object-oriented concurrent programming /Yonezawa87/ naturally fits the computing agents composing the network, this parsing scheme has been implemented in an object-oriented language for con° current programming ABCI, /1/Yonezawa86/by representing each computing agent in the network as an object of ABCL/L 2 T h e Bas le S c h e m e 2:1 A S y m b o l as a C o m i ) u t l n g A g e n t Our approach is basically bottom-up. Suppose we have a context fi-ee grammar rule such as:
منابع مشابه
An object oriented approach to parser generation in C++
In this paper we describe the design and implementation of a system for representing context-free grammars in C++. The system allows for grammar representation at the object level, providing enhanced modularity and flexibility when compared to traditional generator-based approaches. We also describe the transformation of grammar flow analysis problems into an object-oriented framework using the...
متن کاملConditional Adaptive Star Grammars
The precise specification of software models is a major concern in the model-driven design of object-oriented software. Models are commonly given as graph-like diagrams so that graph grammars are a natural candidate for specifying them. However, context-free graph grammars are not powerful enough to specify all static properties of a model. Even the recently proposed adaptive star grammars cann...
متن کاملParsing with the Shortest Derivation
Common wisdom has it that the bias of stochastic grammars in favor of shorter derivations of a sentence is harmful and should be redressed. We show that the common wisdom is wrong for stochastic grammars that use elementary trees instead of context-free rules, such as Stochastic Tree-Substitution Grammars used by Data-Oriented Parsing models. For such grammars a non-probabilistic metric based o...
متن کاملPractical Packrat Parsing
A considerable number of research projects are exploring how to extend object-oriented programming languages such as Java with, for example, support for generics, multiple dispatch, or pattern matching. To keep up with these changes, language implementors need appropriate tools. In this context, easily extensible parser generators are especially important because parsing program sources is a ne...
متن کاملInducing Compact but Accurate Tree-Substitution Grammars
Tree substitution grammars (TSGs) are a compelling alternative to context-free grammars for modelling syntax. However, many popular techniques for estimating weighted TSGs (under the moniker of Data Oriented Parsing) suffer from the problems of inconsistency and over-fitting. We present a theoretically principled model which solves these problems using a Bayesian non-parametric formulation. Our...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
دوره شماره
صفحات -
تاریخ انتشار 1988